

<%@ page import="ar.com.hakasoft.entities.ItemFactura" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'itemFactura.label', default: 'ItemFactura')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${itemFacturaInstance}">
            <div class="errors">
                <g:renderErrors bean="${itemFacturaInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="articulo"><g:message code="itemFactura.articulo.label" default="Articulo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: itemFacturaInstance, field: 'articulo', 'errors')}">
                                    <g:select name="articulo.id" from="${ar.com.hakasoft.entities.Articulo.list()}" optionKey="id" value="${itemFacturaInstance?.articulo?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cantidad"><g:message code="itemFactura.cantidad.label" default="Cantidad" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: itemFacturaInstance, field: 'cantidad', 'errors')}">
                                    <g:textField name="cantidad" value="${fieldValue(bean: itemFacturaInstance, field: 'cantidad')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="factura"><g:message code="itemFactura.factura.label" default="Factura" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: itemFacturaInstance, field: 'factura', 'errors')}">
                                    <g:select name="factura.id" from="${ar.com.hakasoft.entities.Factura.list()}" optionKey="id" value="${itemFacturaInstance?.factura?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="precioUnitario"><g:message code="itemFactura.precioUnitario.label" default="Precio Unitario" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: itemFacturaInstance, field: 'precioUnitario', 'errors')}">
                                    <g:textField name="precioUnitario" value="${fieldValue(bean: itemFacturaInstance, field: 'precioUnitario')}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
